//
//  UILabel+MAAdv.m
//  MateAdv
//
//  Created by 茶 on 2023/9/15.
//

#import "UILabel+MAAdv.h"

@implementation UILabel (MAAdv)

+ (instancetype)ma_labelWithSuperView:(UIView *)superView text:(NSString *)text textFont:(UIFont *)textFont textColor:(UIColor *)textColor textAlignment:(NSTextAlignment)textAlignment makeMasonryBlock:(void (^)(MASConstraintMaker * _Nonnull))makeMasonryBlock {
    UILabel *label = [UILabel new];
    label.text = text;
    label.font = textFont;
    label.textColor = textColor;
    label.textAlignment = textAlignment;
    [superView addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        MABlock(makeMasonryBlock, make);
    }];
    return label;
}

@end
